// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 获取关联记录 POST /api/login-record/${param0}/${param1}/${param2}/related-records */
export async function postApiLoginRecordByIdByIndexByLimitRelatedRecords(
  params: {
    // path
    /** 目标记录id */
    id: number;
    /** 当前页码 */
    index: number;
    /** 每页数量 */
    limit: number;
  },
  body: API.LoginRecordSort,
  options?: { [key: string]: any },
) {
  const { id: param0, index: param1, limit: param2, ...queryParams } = params;
  return request<API.SimpleResultPagingListLoginRecordDetailDto>(
    `/api/login-record/${param0}/${param1}/${param2}/related-records`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json-patch+json',
      },
      params: { ...queryParams },
      data: body,
      ...(options || {}),
    },
  );
}

/** 分页查询 POST /api/login-record/${param0}/${param1}/paged-list */
export async function postApiLoginRecordByIndexByLimitPagedList(
  params: {
    // query
    StartTime?: string;
    EndTime?: string;
    Host?: string;
    Account?: string;
    // path
    /** 当前页码 */
    index: number;
    /** 每页数量 */
    limit: number;
  },
  body: API.LoginRecordSort,
  options?: { [key: string]: any },
) {
  const { index: param0, limit: param1, ...queryParams } = params;
  return request<API.SimpleResultPagingListLoginRecordDto>(
    `/api/login-record/${param0}/${param1}/paged-list`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json-patch+json',
      },
      params: {
        ...queryParams,
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 查询明细数据 GET /api/login-record/detail/${param0} */
export async function getApiLoginRecordDetailById(
  params: {
    // path
    id: number;
  },
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.SimpleResultLoginRecordDetailDto>(`/api/login-record/detail/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
